There are many computer software applications written in one language and compiled for a particular microprocessor Instruction Set Architecture (ISA). Sometimes, when new computer hardware is purchased to replace old hardware it involves a change in class of microprocessor, which can mean a change in ISA. It is desirable in some situations to translate compiled binary code from one ISA to another without the need to recompile a legacy software application for the new ISA.
It is known to use a binary translator to perform this task. In some instances one ISA will have different capabilities to deal with certain types of instruction. Of particular concern to this invention is the different ways some ISAs deal with conditional instructions. The manner of dealing with conditional instructions can be a significant factor in the microprocessor's efficiency at executing code.
Some Reduced Instruction Set Computing (RISC) processors, such as Hewlett-Packard's PA-RISC, provide capabilities of dynamically changing an execution path by conditionally nullifying instructions. If the execution of an instruction results in a certain condition, the following instruction may be nullified automatically based on this condition. The condition is usually specified in the instruction which may produce the condition and always immediately precedes the instruction which may have to be nullified.
Other processors, such as Intel's Itanium Processor (which uses the IA-64 instruction set), provides predication of instructions. Predication converts control dependency into data dependency by setting Boolean predicate registers upon satisfying a condition. The predicate registers can prefix most IA-64 instructions. When the predicate register prefixing an instruction is set to FALSE the instruction's updates are suppressed, making it behave like a no-operation (nop) instruction.
Because of the different approach an ISA which is based on nullification (nullification based instruction set architecture or NBISA) has when compared an ISA which is based on predication (predication based instruction set architecture or PBISA), dealing with translating from NBISA to PBISA is difficult and is traditionally very expensive in terms of use of predicate registers.